﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@XSTDZ.ERP.Infrastructure.SystemConfig.SystemName@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/ligerUI/skins/Aqua/css/ligerui-all.css")" rel="stylesheet" type="text/css" />
     <link href="@Url.Content("~/Scripts/ligerUI/skins/ligerui-icons.css")" rel="stylesheet" type="text/css" />
    @Scripts.Render("~/Scripts/jquery-1.7.1.min.js")
     @Scripts.Render("~/Scripts/ligerUI/js/ligerui.min.js")
       @Scripts.Render("~/Content/js/Base.js")
        @Scripts.Render("~/Scripts/ligerUI/js/plugins/ligerResizable.js")
    @RenderSection(@"Header", false)
</head>
<body>
    @RenderBody()
    @RenderSection("scripts", required: false)
</body>
</html>

<script type='text/javascript'>
    var ids="@ViewData["XSCUSERPERMISSION"]";
    var htmlIds="@ViewData["XSCUSERPERMISSIONHTML"]";
    function hiddenUserPermission(id){
           var node= $("div [toolbarid='"+id+"']");
           node.hide();
           var nextNode=node.next();
           if(nextNode.attr("class")=="l-bar-separator"){
            nextNode.hide();
           }
           
    }
   function xscUserPermissionControll(){
                     if(ids!=null&&ids!=undefined&&ids.length>0)
                        {
                            var idArrays=ids.split(",");
                            if(idArrays.length>0){
                                for(var i=0;i<idArrays.length;i++)
                                {
                                //alert(idArrays[i]);
                                 if(idArrays[i]!=undefined&&idArrays[i].length>0){
                                 hiddenUserPermission(idArrays[i]);
                                 }
                                 }
                            }
                        }                
    }
    function xscUserPermissionControllHtml(){
         if(htmlIds!=null&&htmlIds!=undefined&&htmlIds.length>0)
                        {
                            var idArrays=htmlIds.split(",");
                            if(idArrays.length>0){
                                for(var i=0;i<idArrays.length;i++)
                                {
                                 if(idArrays[i]!=undefined&&idArrays[i].length>0){
                                 hiddenUserPermission(idArrays[i]);
                                    $("#"+idArrays[i]).css({"display":"none"});
                                 }
                                 }
                            }
                        }      
    }
    function xscUserPermissionControllInit()
    {
        xscUserPermissionControll();
        xscUserPermissionControllHtml();
    }
    window.onload=xscUserPermissionControllInit;
</script>
